@use "vuepress-shared/styles/reset";

.vp-appearance-button {
  @include reset.button;

  position: relative;
  padding: 0.375rem;
  color: var(--vp-c-text-mute);

  .icon {
    vertical-align: middle;
    width: 1.25rem;
    height: 1.25rem;
  }
}

.vp-appearance-dropdown {
  position: absolute;
  inset-inline-end: 0;
  top: 100%;

  overflow-y: auto;

  box-sizing: border-box;
  min-width: 100px;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--vp-c-divider);
  border-radius: 0.25rem;

  background: var(--vp-c-bg);
  box-shadow: 2px 2px 10px var(--vp-c-shadow);

  text-align: start;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;

  transition: all 0.18s ease-out;

  transform: scale(0.8);

  > *:not(:last-child) {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--vp-c-border);
  }

  .vp-appearance-button:hover &,
  .vp-appearance-button.open & {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
}
